import request from '@/utils/request'

export const getPayRecordPageApi = async (params: any) => {
    return request.get('/pay-record', { params })
}

export const getGenPayRecordApi = async (params: any) => {
    return request.get('/pay-record/gen-record', { params })
}

export const getPayRecordOptionListApi = async () => {
    return request.get('/pay-record/option-list')
}

export const getPayRecordByIdApi = async (id: string) => {
    return request.get(`/pay-record/${id}`)
}

export const createPayRecordApi = async (data: any) => {
    return request.post('/pay-record', data)
}

export const updatePayRecordApi = async (id: any, data: any) => {
    return request.put(`/pay-record/${id}`, data)
}

export const deletePayRecordApi = async (id: string) => {
    return request.delete(`/pay-record/${id}`)
}
